using JoyfulHomeJourney.BackEnd.Infrastructure.EFCore;
using JoyfulHomeJourney.BackEnd.Infrastructure.Dtos.Responses.Objects;
using JoyfulHomeJourney.BackEnd.Infrastructure.Tools;
namespace JoyfulHomeJourney.BackEnd.Server.Instances.Extends.Responses
{
	public static class ShippingInfosExtend
{
		public static ResponseShippingInfosDto ToResponseDto(this ShippingInfos entity)
{			return new ResponseShippingInfosDto
			{
				companyId = entity.SiCompanyId,
				createAt = entity.SiCreateAt,
				createAtStr =Tools.TimeToString(entity.SiCreateAt),
				currentStatus = entity.SiCurrentStatus,
				estimatedArrivalDate = entity.SiEstimatedArrivalDate,
				estimatedArrivalDateStr =Tools.TimeToString(entity.SiEstimatedArrivalDate),
				id = entity.SiId,
				orderDetailId = entity.SiOrderDetailId,
				shippingDate = entity.SiShippingDate,
				shippingDateStr =Tools.TimeToString(entity.SiShippingDate),
				trackingNumber = entity.SiTrackingNumber,
				updateAt = entity.SiUpdateAt,
				updateAtStr =Tools.TimeToString(entity.SiUpdateAt),
			};
		}
	}
}
